package com.magicborrow.utils;

import android.app.ProgressDialog;
import android.widget.Toast;

import com.android.volley.VolleyError;
import com.magicborrow.Constants;
import com.magicborrow.beans.ApplyEntity;
import com.magicborrow.views.MsgDialog;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by River on 6/12/16.
 */
public class SendRequestUtil {


    private void sendRequest(final ApplyEntity.ContentData bean, final int cStatus, final int position, final String msg) {
        Map<String, String> params = new HashMap<>();
        params.put("id", bean.getId() + "");
        params.put("status", cStatus + "");
        // params.put("acc_token", UserTools.getUser(mContext).getAcc_token());
//        VolleyTool.get(Constants.FLOW_CONTROL, params, new VolleyTool.HTTPListener() {
//            @Override
//            public <T> void onResponse(T t, int requestCode) {
//                progressDialog.dismiss();
//                try {
//                    JSONObject json = new JSONObject(t.toString());
//                    int code = json.getInt("code");
//                    if(code == 0){
//                        mData.get(position).setStage(cStatus);
//                        ApplySendAdapter.this.notifyItemChanged(position);
//                    }
//                } catch (JSONException e) {
//                    // e.printStackTrace();
//                }
//            }
//            @Override
//            public void onErrorResponse(VolleyError error, int requestCode) {
//                progressDialog.dismiss();
//                Toast.makeText(mContext,"服务器暂时无法链接",Toast.LENGTH_SHORT).show();
//            }
//        },0,null);
//    }
    }
}
